package demo0914;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

public class T4_0523 {
    public static void main(String[] args) {
        ExecutorService service = Executors.newCachedThreadPool();
        service.submit(()->{
            System.out.println("service");
        });
        ExecutorService service1 = Executors.newFixedThreadPool(10);
        service1.submit(()->{
            System.out.println("service1");
        });
        ExecutorService service2 = Executors.newSingleThreadExecutor();
        service2.submit(()->{
            System.out.println("service2");
        });
        ExecutorService service3 = Executors.newScheduledThreadPool(10);
        service3.submit(()->{
            System.out.println("service3");
        });
    }
}
